package czk.jvm.lecture.bytecode;

public class MyTest5 {
    public static void main(String[] args) {
        Fruit apple=new Apple();
        apple.test();
        Fruit fruit=new Fruit();
        fruit.test();
        Fruit origin=new Origin();
        origin.test();
    }
}
class Fruit{
    public void test(){
        System.out.println("fruit");
    }
}
class Apple extends Fruit{
    @Override
    public void test() {
        System.out.println("Apple");
    }
}
class Origin extends Fruit{
    @Override
    public void test() {
        System.out.println("origin");
    }
}
